package top.forgirl.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

@Setter
@Getter
@ToString
@ApiModel("登录抽象模型POJO")
public class Login {

    @JsonIgnore
    private Integer id;
    @JsonIgnore
    private Integer deletedFlag;

    @Size(min = 6, max = 11, message = "请检查用户名是否合法")
    @ApiModelProperty(required = true, example = "1779251931")
    private String principal;
    @ApiModelProperty(required = true, example = "123456789")
    @Size(min = 6, max = 16, message = "请检查密码强度")
    private String credential;

    @JsonIgnore
    private String limit;
    @JsonIgnore
    private LocalDateTime createTime;
    @JsonIgnore
    private LocalDateTime updateTime;
}
